def worker(req):
    # Body response
    body = '''\
        <!DOCTYPE html>
        <head>
<title>Wasm Workers Server</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/water.css">
<style>
  body {{ max-width: 1000px; }}
  main {{ margin: 5rem 0; }}
  h1 {{ margin: .5rem 0 2rem; }}
  h1, p {{ text-align: center; }}
  pre {{ font-size: .9rem; }}
  pre > code {{ padding: 2rem; }}
  p {{ margin-top: 2rem; }}
</style>
</head>
<body>
<main>
  <h1>Hello from Wasm Workers Server 👋</h1>
  <pre><code>Replying to {url}
Method: {method}
Host header: {host}</code></pre>
  <p>
    This page was generated by a Python script
  </p>
</main>
</body>
    '''.format(
        url=req.url,
        method=req.method,
        host=req.headers["host"]
    )

    # Build a new response
    res = Response(body)

    # Add a new header
    res.headers["x-generated-by"] = "wasm-workers-server"

    return res